cmake_minimum_required(VERSION 3.5.1)
project(Tree)

if(BUILD_TOTAL STREQUAL ON)
	set(BINTREE_SRC BinTree/bintree.c)

	set(TREE_SRC ${BINTREE_SRC})

	add_library(LTree STATIC ${TREE_SRC})
	add_library(ltree SHARED ${TREE_SRC})

	install(TARGETS LTree ARCHIVE ${INSTALL_DIR}/lib/liblds)
	install(TARGETS ltree LIBRARY ${INSTALL_DIR}/lib/${CMAKE_LIBRARY_ARCHITECTURE})
	install(FILES ${INCLUDE_DIR}/ ../../include/Tree/*.h DESTINATION ${INSTALL_DIR}/include/liblds)
else()
	add_subdirectory(BinTree/) # Binary Tree 二叉树
endif()
